<%@ page language="java" pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>纳税人基本信息</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	  <script src="${ctx}/js/table.js" type="text/javascript" language="javascript"></script>
	  <link rel="stylesheet" href="${pageContext.request.contextPath}/css/ui.datepicker.css" type="text/css" media="screen"  charset="utf-8" />
		<script  src="${ctx}/js/jquery-1.5.2.js" type="text/javascript" charset="utf-8"></script>	
		<script src="${ctx}/js/ui.datepicker.js" type="text/javascript" charset="utf-8"></script>	
		<script src="${ctx}/js/ui.datepicker-zh-CN.js" type="text/javascript" charset="utf-8"></script>	
		<script type="text/javascript" src="${ctx}/js/help.js"></script>
		<script type="text/javascript" charset="utf-8">
		jQuery(function($){
			$('#p_birthday').datepicker({
					yearRange: '1900:2099', //取值范围.
					showOn: 'both', //输入框和图片按钮都可以使用日历控件。
					buttonImage: '${ctx}/images/calendar.gif', //日历控件的按钮
					buttonImageOnly: true,
					showButtonPanel: true
				});		
			});
	</script>
<style type="text/css">
#Layer1 {
	position:absolute;
	width:1070px;
	height:263px;
	z-index:1;
	left: 0px;
	top: 172px;
}
body {
	background-color:#F2FDDB;
}
#content {
	position:absolute;
	width:1070px;
	height:180px;
	z-index:2;
	left: 0px;
	top: 0px;
}
.style{
background-color:#CCCCFF;
border:1px solid #BFD1EB;
}
a{
text-decoration:none;
}
a:link,a:visited,a:hover{
text-decoration:none;
color:#333333;
}
#tishi {
	position:absolute;
	width:188px;
	height:40px;
	z-index:3;
	left: 38px;
	top: 30px;
}
#div1{
position:absolute;
background:#FFFFCC;
left:880px;
top:55px;
overflow:hidden;
width:180px;
display:none;
z-index:5;
}
.c {width:20px;height:20px;}
.c ul {margin:0px;padding:0px;}
.c ul li{width:16px;height:17px;float:left; 
background-image:url('${pageContext.request.contextPath}/images/help.jpg');
list-style-type:none}
.STYLE1 {color: #FF0000}
</style>
<script language="javascript" type="text/javascript">
function validate()
{    var k=document.form1.p_id.value;
   document.getElementById("p_sfznumber").value=k
     if(document.getElementById("p_id").value==""){
     alert("纳税人识别码  不能为空，请输入");
     return false;}
   if(document.getElementById("p_id").value.length!=18){
	     alert("纳税人识别码为18位数字");
	     return false;}
     if(document.getElementById("p_sfznumber").value==""){
     alert("纳税人身份证号 不能为空，请输入");
     return false;}
     if(document.getElementById("p_name").value==""){
     alert("纳税人姓名 不能为空，请输入");
     return false;}
     if(document.getElementById("p_sex").value==""){
     alert("纳税人性别 不能为空，请输入");
     return false;}
	   if(document.getElementById("p_identityLicensesType").value==""){
     alert("请选择身份证类型");
     return false;}
	  if(document.getElementById("p_nationality").value==""){
     alert("纳税人国籍 不能为空，请输入");
     return false;}
     if(document.getElementById("p_familyadd").value==""){
     alert("纳税人家庭住址 不能为空，请输入");
     return false;}
     if(document.getElementById("p_position").value==""){
     alert("任职 不能为空，请输入");
     return false;}
     if(document.getElementById("p_workspace").value==""){
     alert("单位名称 不能为空，请输入");
     return false;}
     if(document.getElementById("p_workadd").value==""){
     alert("单位地址 不能为空，请输入");
     return false;}
     if(document.getElementById("p_callnumber").value==""){
     alert("联系方式 不能为空，请输入");
     return false;}
	 return true;
 }
function checkByNumber(){
	if(document.getElementById("p_id").value==""){
     alert("纳税人识别码  不能为空，请输入");
     return false;
     }
   if(document.getElementById("p_id").value.length!=18){
	     alert("纳税人识别码为18位数字");
	     return false;
	}
	$("#p_sfznumber").val($("#p_id").val());
    var param = {"cardno":$("#p_id").attr("value")};  
    $.ajax({   
        url:"${ctx}/taxmanage/tmPersonInfo_check.action",   
        type:"post",   
        data:param,   
        dataType:"json",   
        success:function(data){ 
			 alert(data);
                }    
            }); 
 return false; 
}
function isMobile(p_callnumber)
{
var s =document.getElementById('p_callnumber').value; 
var reg0 = /^13\d{5,9}$/;
var reg1 = /^153\d{4,8}$/;
var reg2 = /^159\d{4,8}$/;
var reg3 = /^0\d{10,11}$/;
var my = false;
if (reg0.test(s))my=true;
if (reg1.test(s))my=true;
if (reg2.test(s))my=true;
if (reg3.test(s))my=true;
    if(s!="")
    {
        if (!my)
        {
           alert('请输入正确的手机号码');
           p_callnumber.value="";
           p_callnumber.focus();
        }
    }
}

</script>
</head>

<body>
<div id="content">
<table width="100%" height="100%" border="0">
  <tr>
    <td>
	<form  id="form1" name="form1"action="${ctx}/taxmanage/tmPersonInfo_execute.action" method="post" onSubmit="return validate();">
       <fieldset>
   <legend style="font-size:15px; color:#333333">纳税个人基本信息登记</legend>
 
   <table width="819" height="142" border="0" align="center" cellspacing="0" style="font-size:13px; color:#333333">
  <tr>
  <td width="69" rowspan="4">&nbsp;</td>
    <td width="128" height="29" align="right">纳税人识别码：</td>
    <td width="139"><input  style="width:120px"type="text" name="entity.pcode" id="p_id" onBlur="checkByNumber()"> </td>
    <td width="113" align="right">纳税人姓名：</td>
    <td width="143"><input  style="width:70px;"type="text" name="entity.taxplayer" id="p_name"></td>
    <td width="102" align="right">&nbsp;</td>
    <td width="111"><div class="c">
          <ul>
            <li onMouseOver="f_s('div1')" onMouseOut="closeW('div1')"></li>
          </ul>
        </div>帮助</td>
  </tr>
  <tr>
    <td height="31" align="right">性别：</td>
    <td><select name="entity.gender" id="p_sex">
      <option disabled="disabled" selected="selected">--请选择--</option>
      <option value="男">男</option>
      <option value="女">女</option>
    </select></td>
    <td align="right">身份证号：</td>
    <td><input  style="width:120px;"type="hidden"  name="entity.cardno"  id="p_sfznumber">
	<input type="text" style=" width:120px" disabled value="系统自动判别">
	</td>
    <td align="right">身份证类型：</td>
    <td><select name="entity.idcard" id="p_identityLicensesType">
    <option  selected disabled>请选择类型</option>
	     <option value="居民身份证">居民身份证</option>
		  <option value="临时身份证">临时身份证</option>
    </select>
    </td>
    </tr>
  <tr>
    <td height="26" align="right">家庭住址：</td>
    <td><input  style="width:130px;"type="text" name="entity.address" id="p_familyadd"></td>
    <td align="right">国籍：</td>
    <td><input style="width:80px;" type="text" name="entity.nationality" id="p_nationality"></td>
    <td align="right">任职：</td>
    <td><input style="width:80px;" type="text" name="entity.position" id="p_position"></td>
    </tr>
  <tr>
    <td height="28" align="right">单位名称：</td>
    <td><input  style=" width:130px;"type="text" name="entity.orgname" id="p_workspace"></td>
    <td align="right">单位地址：</td>
    <td><input  style="width:130px;"type="text" name="entity.orgaddress" id="p_workadd"></td>
    <td align="right">联系方式(手机)：</td>
    <td><input style=" width:100px;" type="text" name="entity.phone" id="p_callnumber" onChange="isMobile(p_callnumber)"></td>
    </tr>

  <tr>
    <td>&nbsp;</td>
    <td align="right">&nbsp;</td>
    <td align="right"><input  style="width:70px; height:25px;"type="submit" name="Submit" value="提  交"></td>
    <td colspan="4"><input  style="width:70px; height:25px;"type="reset" name="Submit2" value="重  置"></td>
  </tr>
</table>
</fieldset>
  </form>
	
	</td>
  </tr>
</table>


</div>
   <div id="tishi">
     <table width="100%" height="30" border="0">
       <tr>
         <td height="40" style="font-size:12px"><span class="STYLE1">温馨提示：</span><br>
         纳税个人识别码为该身份证号</td>
       </tr>
     </table>
</div>
<div id="Layer1">
<table width="100%" height="273" border="0" cellspacing="0">
  <tr>
    <td colspan="5">
	<table width="1070" height="30" border="1" cellspacing="0" bordercolor="#666666" frame="above" rules="rows" class="style">
    <tr style="background-color:#CCCCFF; font-size:13px; color:#849BCA" align="center">
      <td width="139" height="30">纳税人识别码</td>
      <td width="127">身份证类型</td>
      <td width="77">纳税人姓名</td>
      <td width="180">家庭地址</td>
      <td width="68">任职</td>
      <td width="173">单位名称</td>
      <td width="184">单位地址</td>
      <td width="88">联系方式</td>
    </tr>
	</table>
	</td>
    </tr>
  <tr>
    <td height="213" colspan="5" valign="top">
	<table width="1069" border="1" cellspacing="0" style="border-collapse: collapse" bordercolor="#FFCCFF" id="tbColor" frame="hsides" rules="cols">
	<c:forEach items="${pageView.records}" var="entity">
    <tr style="font-size:12px" align="center">
      <td width="137" align="center">${entity.pcode}</td>
      <td width="129" align="center">${entity.idcard}</td>
      <td width="75" align="center">${entity.taxplayer}</td>
      <td width="181" align="center">${entity.address}</td>
      <td width="70" align="center">${entity.position}</td>
      <td width="173" align="left">${entity.orgname}</td>
      <td width="183" align="left">${entity.orgaddress}</td>
      <td width="87" align="center">${entity.phone}</td>
    </tr>
	</c:forEach>
	</table>
	</td>
    </tr>
  	<%@ include file="/pages/taxmanage/fenye.jsp"%>
</table>

</div>
 <div id="div1" onMouseOver="showDiv()" onMouseOut="closeW('div1')">
<fieldset>
<fieldset>
<table width=100%  height="240" border="1" cellspacing="0" frame="void" rules="rows">
  <tr>
    <td align="left" style="font-size:13px;" height="25">帮助提示：</td>
  </tr>
  <tr>
    <td align="left" style="font-size:12px" valign="top">1.纳税人识别码为18位身份证号;
	<br><br>2.家庭住址为纳税个人在中国境内永久有效的居住地址<br><br>3.联系方式可为手机号码，长度为11位;
	</td>
  </tr>
</table>
</fieldset>
</fieldset>
</div>

</body>
</html>
